import 'package:flutter/material.dart';
import 'package:flutter_uikit/utils/uidata.dart';

class RowTextView extends StatelessWidget {
  final String leftText;
  final String centerText;
  final String rightText;
  final bool showRight;
  const RowTextView(
      {Key key,
      this.leftText,
      this.centerText,
      this.rightText = "",
      this.showRight = false})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 250,
      margin: EdgeInsets.only(top: 22),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Text(this.leftText,
              style: TextStyle(
                  fontWeight: FontWeight.bold,
                  fontSize: 17,
                  color: Color.fromRGBO(162, 165, 176, 1))),
          SizedBox(
            width: 15,
          ),
          Text(this.centerText,
              style: TextStyle(
                  fontWeight: FontWeight.bold,
                  fontSize: 17,
                  color: UIData.myTextColor)),
          SizedBox(
            width: 5,
          ),
          Visibility(
            visible: showRight,
            child: Text(rightText,
                style: TextStyle(
                    fontWeight: FontWeight.bold,
                    fontSize: 14,
                    color: Colors.orange)),
          )
        ],
      ),
    );
  }
}
